<?php echo $this->Partial('index/tpl/header.phtml')?>
<?php $product = $this->v['product']?>
<style>

.product2 {position:relative;}
.product2 .cur_product{}
.product2 .cur_product img{width:400px;height:400px;margin:5px auto;display:block;}
.product2 .prev_product,.product2 .next_product{position:absolute;left:0;top:160px;width:40px;height:40px;opacity:0.8;filter:Alpha(Opacity=80)}
.product2 .next_product{right:0;left:auto;}
.product2 .prev_product a,.product2 .next_product a{display:block;background:#CCC;border-radius:10px;text-indent:-9999px;overflow:hidden;width:40px;height:40px;}
.product2 .prev_product a:hover,.product2 .next_product a:hover{background:#999;}
</style>
<dl class="product2 _jsib_products">
	<dt class="cur_product">
		<img src="<?php echo $this->Picture($product['product_img_id'], 'size400')?>"/>
	</dt>
	<dd>
		<em class="price">￥<b><?php echo $product['product_price']?></b></em>
		来自<a href="/tiao/product/<?php echo $product['product_id']?>/outlink" target="_blank"><?php echo $product['site_name']?></a>
		<h4 title="<?php echo $product['product_name']?>"><?php echo $product['product_name']?></h4>
	</dd>
	<?php if($this->v['prevProduct']):?>
	<dt class="prev_product"><a href="/tiao/product/<?php echo $this->v['prevProduct']['product_id']?>?type=<?php echo $this->v['choose_type'] ? 'yes' : 'no'?>" title="上一个产品"><?php echo $this->v['prevProduct']['product_name']?></a></dt>
	<?php endif;?>
	<?php if($this->v['nextProduct']):?>
	<dt class="next_product"><a href="/tiao/product/<?php echo $this->v['nextProduct']['product_id']?>?type=<?php echo $this->v['choose_type'] ? 'yes' : 'no'?>" title="下一个产品"><?php echo $this->v['nextProduct']['product_name']?></a></dt>
	<?php endif;?>
</dl>
<script>
hapj({
	sib_products:function(E) {
		if (!hapj.browser.mobile && hapj.ui._id('modalDlg')) {
			E.on('a', 'click', function(e){
				var t = e.target;
				if (/^(prev|next)_product$/.test(t.parentNode.className || '')) {
					hapj.get('modalDlg').show(t.href);
					return false;
				}
			});
		}
		if (hapj.browser.mobile) {
			E.cls('cur_product').touchable({
				right:function(){
					var a = E.cls('prev_product').tag('a');
					if (a.length) {
						location.href = a.attr('href');
					}
				},
				left:function(){
					var a = E.cls('next_product').tag('a');
					if (a.length) {
						location.href = a.attr('href');
					}
				}
			});
		}
	}
});
</script>

<ul class="g _jchooseNums choose_tab">
	<li<?php echo $this->v['choose_type'] == 1 ? ' class="on"' : ''?>><a href="/tiao/product/<?php echo $product['product_id']?>?type=yes">挑(<?php echo $product['yes_num']?>)</a></li>
	<li<?php echo $this->v['choose_type'] == 0 ? ' class="on"' : ''?>><a href="/tiao/product/<?php echo $product['product_id']?>?type=no">不挑(<?php echo $product['no_num']?>)</a></li>
</ul>
<div id="chooseList">
<?php echo $this->Partial('tiao/tpl/choose_list.phtml', array('choose_type'=> $this->v['choose_type']))?>
</div>
<script>
if (!hapj.browser.mobile && hapj.ui._id('modalDlg')) {
	hapj({
		chooseNums:function(E){
			E.on('a','click', function(e){
				hapj.get('modalDlg').show(e.target.href);
				return false;
			});
		}
	});
}
</script>

<?php echo $this->Partial('index/tpl/footer.phtml')?>